package com.liu.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liu.seckill.pojo.User;
import com.liu.seckill.vo.LoginVo;
import com.liu.seckill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @ClassName IUserService
 * @Author ：name
 * @Date ：2022-02-14 17:05
 * @Description：
 * @Version: 1.0
 */
public interface IUserService  extends IService<User> {
    /**
      * 登录
      * @param loginVo
      * @return
      */
  RespBean login(HttpServletRequest request, HttpServletResponse response,
                  LoginVo loginVo);

    /**
     * 根据cookie获取用户
     * @param userTicket
     * @param request
     * @param response
     * @return
     */
    User getByUserTicket(String userTicket,HttpServletRequest
            request,HttpServletResponse response);

    /**
     * 更新密码
     * @param userTicket
     * @param id
     * @param password
     * @return
     */
    RespBean updatePassword(String userTicket,Long id,String password);

}
